package org.dtrd.modules.record.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.dtrd.modules.record.entity.bean.PatientShortInfo;
import org.dtrd.modules.record.entity.po.DtrdViewRlPatientSugarValue;

import java.util.List;

/**
 * <p>
 * VIEW Mapper 接口
 * </p>
 *
 * @author QR
 * @since 2022-04-18
 */
@Mapper
public interface DtrdViewRlPatientSugarValueMapper extends BaseMapper<DtrdViewRlPatientSugarValue> {

    /**
     * 今日测量患者与测量数据
     *
     * @param doctorId
     * @param orgCode
     * @param recordDate
     * @return
     */
    List<PatientShortInfo> getMeasurePatientList(@Param("doctorId") Integer doctorId, @Param("orgCode") String orgCode, @Param("recordDate") String recordDate);

    List<PatientShortInfo> getMeasurePatientListV2(@Param("doctorIdList") List<Integer> teamDoctorIdList, @Param("orgCode") String orgCode, @Param("recordDate") String recordDate);

    /**
     * 分页查询最新测量
     *
     * @param page
     * @param teamDoctorIdList
     * @param orgCode
     * @param recordDate
     * @return
     */
    IPage<PatientShortInfo> getMeasurePatientListV3(IPage<PatientShortInfo> page, @Param("doctorIdList") List<Integer> teamDoctorIdList, @Param("orgCode") String orgCode, @Param("recordDate") String recordDate);
}
